import request from '@/utils/http'
import { responseUserInfoType } from './type'

enum API {
  // 获取会员信息
  AUTH_GET_URL = '/user/auth/getUserInfo',
  // 会员认证
  AUTH_LOGIN_URL = '/user/auth/userAuah',
}

/**获取会员信息*/
export const membershipInformationAPI = () => {
  return request<any, responseUserInfoType>({
    url: API.AUTH_GET_URL,
  })
}

/**
 * 会员认证
 *
 */
export const memberOfCertificationAPI = (data: { certificatesNo: string; certificatesType: string; certificatesUrl: string; name: string }) => {
  return request({
    method: 'POST',
    url: API.AUTH_LOGIN_URL,
    data,
  })
}
